package com.stu.day11.factory2;

import com.stu.day11.factory1.*;

/**
 * 工厂方法设计模式
 * 多方法
 * @author zy
 * @date 2025/2/3 17:45
 */
public class BirdFactory1 {
    public Flyable createBirdA(){
        return new BirdA();
    }
    public Flyable createBirdB(){
        return new BirdB();
    }
}
class Factory1Test{
    public static void main(String[] args) {
        BirdFactory1 bf1 = new BirdFactory1();
        Flyable birdA = bf1.createBirdA();
        Flyable birdB = bf1.createBirdB();

        birdA.fly();
        birdB.fly();
    }
}
